//
//  Learner.h
//  Pennyworth
//
//  Created by Chris Karr on 12/24/07.
//  Copyright 2007 Chris J. Karr. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#define FETCH_PREDICTION @"Fetch Prediction"

#define FEATURE_LIST @"Feature List"
#define FEATURE_STRING @"Feature String"
#define FEATURE_SENSOR @"Feature Sensor"
#define FEATURE_OBSERVATION @"Feature Observation"

#define PREDICTION_FETCHED @"Prediction Fetched"
#define PREDICTION @"Prediction"
#define KEY @"Key"
#define ADD_EXAMPLE @"Add Example"
#define REMOVE_LAST_EXAMPLE @"Remove Last Example"

@interface Learner : NSObject 
{
	NSMutableDictionary * classCount;
	NSString * key;
	NSString * lastLabel;
}

@property(copy) NSString * lastLabel;

- (void) addExample:(NSArray *) features forClass:(NSString *) label;
- (NSString *) getLabelForExample:(NSArray *) features;

- (NSNumber *) exampleCount;
- (void) reset;

- (void) setKey:(NSString *) newKey;

- (NSString *) htmlRepresentation;

@end
